﻿using System;
using Leap;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Threading;

namespace LeapInterface
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            if (MyGlobals.gui)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new Form1());
            }
            else
            {
                LeapListener listener = new LeapListener();
                Controller controller = new Controller();
                controller.SetPolicyFlags(Leap.Controller.PolicyFlag.POLICYBACKGROUNDFRAMES);
                //LeapController leapController = new LeapController(listener, controller);
                controller.AddListener(listener);
            }

            Console.ReadLine();
            
            
        }  
    }
}
